package com.rxh.controller;

import com.rxh.trade.BaseMethod;
import com.rxh.trade.TradeFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * User: 陈俊雄
 * Date: 2018/9/7
 * Time: 16:47
 * Project: Management
 * Package: com.rxh.controller
 */
@RestController
public class RefundNotifyController {

    @Autowired
    private TradeFactory tradeFactory;

    @RequestMapping(value = "/GrePayRefundNotify")
    private String GrePayRefundNotify( HttpServletRequest req) throws IllegalAccessException, InstantiationException, ClassNotFoundException, IOException {

        BaseMethod baseMethod = tradeFactory.getTrade("grePay");
        return baseMethod.refundNotify(req);

    }
}
